package com.book.service;

import com.book.dto.UserDto;
import com.book.pojo.User;

import java.util.List;

/**
 * @Author LiJinCheng
 * @Date 2020/11/12 11:23 下午
 * @Version 1.0
 * @package com.book.service
 **/
public interface UserService {
    List<User> getUserList();

    /**
     * 用户注册
     * @param user
     * @return
     */
    Integer registerUser(UserDto user);

    /**
     * 查询是否重名
     * @param user
     * @return
     */
    User getUserByName(UserDto user);

    /**
     * 查询手机号是否注册过
     * @param user
     * @return
     */
    User getUserByPhone(UserDto user);

    UserDto doLogin(UserDto user);

    /**
     * 更新个人资料
     * @param user
     * @return
     */
    Integer updateUser(User user);

    User getUserByEmail(UserDto userDto);

    UserDto getUserById(Integer uId);

    Integer getCountByName(String name);

    Integer getCountByPhone(String phone);

    Integer getCountByEmail(String email);

    List<String> getUserListString(Integer code);

    Boolean updatePassword(String pass, String userCode);

    User getUserByCode(String uCode);

    List<UserDto> getUserName(List<Integer> ids);

}
